package com.ygqh.baby.mapper;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.model.OrderInfoForRecon;
import com.ygqh.baby.model.SkuInfoBySupplierRecon;
import com.ygqh.baby.po.YgSupplierReconciliation;
import com.ygqh.baby.po.YgSupplierReconciliationExample;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface YgSupplierReconciliationMapper {

	int countByExample(YgSupplierReconciliationExample example);

	int deleteByExample(YgSupplierReconciliationExample example);

	int deleteByPrimaryKey(Long id);

	int insert(YgSupplierReconciliation record);

	int insertSelective(YgSupplierReconciliation record);

	List<YgSupplierReconciliation> selectByExample(YgSupplierReconciliationExample example);

	YgSupplierReconciliation selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") YgSupplierReconciliation record, @Param("example") YgSupplierReconciliationExample example);

	int updateByExample(@Param("record") YgSupplierReconciliation record, @Param("example") YgSupplierReconciliationExample example);

	int updateByPrimaryKeySelective(YgSupplierReconciliation record);

	int updateByPrimaryKey(YgSupplierReconciliation record);

	int countSuper(@Param("q") String q, @Param("supplierId") Long supplierId, @Param("reconciliationStatus") String reconciliationStatus,
				   @Param("hasZero") boolean hasZero);

	List<YgSupplierReconciliation> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("q") String q, @Param("supplierId") Long supplierId,
											   @Param("reconciliationStatus") String reconciliationStatus, @Param("hasZero") boolean hasZero);

	int deleteByDate(@Param("supplierId") Long supplierId, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

	List<SkuInfoBySupplierRecon> selectBiSkuInfoList(@Param("startTime") Date startTime, @Param("endTime") Date endTime,
													 @Param("supplierId") Long supplierId);

	List<OrderInfoForRecon> selectBiOrderInfoForSold(@Param("startTime") Date startTime, @Param("endTime") Date endTime,
													 @Param("supplierId") Long supplierId);

	List<OrderInfoForRecon> selectBiOrderInfoForReturn(@Param("startTime") Date startTime, @Param("endTime") Date endTime,
													 @Param("supplierId") Long supplierId);

	List<SkuInfoBySupplierRecon> selectSkuInfoByReturnDifference(@Param("startTime") Date startTime,
																 @Param("endTime") Date endTime,
																 @Param("supplierId") Long supplierId);
}
